//
//  MM_HomeSkuDdetailGiveawayHeaderSectionView.m
//  MallManage_IOS
//
//  Created by 张浩 on 2024/1/19.
//

#import "MM_HomeSkuDdetailGiveawayHeaderSectionView.h"

@interface MM_HomeSkuDdetailGiveawayHeaderSectionView ()

@property (nonatomic, strong) UIView *baseView;
@property (nonatomic, strong) UILabel *nameLabel;

@end

@implementation MM_HomeSkuDdetailGiveawayHeaderSectionView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        
        _baseView = [[UIView alloc] init];
        [self.contentView addSubview:_baseView];
        
        _nameLabel = [Custom_ZHTool uiLabelCreate:@"" Font:FONT(18) TextColor:MM_ColorUtil(@"#333333")];
        [self.baseView addSubview:_nameLabel];
        
        [self setUpViews];
    }
    return self;
}

- (void)setUpViews {
    
    [self.baseView mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.right.top.bottom.equalTo(self.contentView);
        make.height.equalTo(40);
    }];
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(12);
        make.centerY.equalTo(self.baseView);
    }];
}

- (void)setSectionModel:(MM_HomeSkuDdetailGiveawaySectionModel *)sectionModel {
    _sectionModel = sectionModel;
    
    self.nameLabel.text = sectionModel.sectionName;
}

@end
